import Mock, {Random} from "mockjs";

interface FileItf {
    path: string;
    isFile: boolean;
    isDir: boolean;
    ext: string;
    fileName: string;
    thumbnailPath: string;
    relativePath: string;
    id: number;
    size: number;
    duration: number;
}

var data = Mock.mock({
    // 属性 list 的值是一个数组，其中含有 1 到 10 个元素
    code: 1,
    data: {
        "imgs|20": [
            {
                "path": "",
                "isFile": Random.boolean(),
                "isDir": Random.boolean(),
                "ext": '.'+ Random.string( 2, 4 ),
                "fileName": "",
                "thumbnailPath": Random.image(),
                "relativePath": "",
                "id": Random.integer(),
                "size": Random.integer(),
                "duration": Random.integer(),
            },
        ],
    },
});
